package com.shujia.core.transformations

import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}

object SortByOpt {
  def main(args: Array[String]): Unit = {
    val conf = new SparkConf()
    conf.setMaster("local")
    conf.setAppName("union合并")

    val sc = new SparkContext(conf)

    val rdd1: RDD[Int] = sc.parallelize(List(123, 5, 35, 6, 7, 32312, 6523, 43))

    rdd1.sortBy((e:Int)=>{-e}).foreach(println)
  }
}
